import React from "react";
import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
import {ControlBar} from "../../control-bar";
import {getSelfEvaluation, saveSelfEvaluation} from "../../../redux";
import {MyIcon, SuTitle} from "../../su-title";
import {MedicineBoxOutlined} from "@ant-design/icons";
import {ClsControl} from "../../block-control";
import {MyEditor} from "../../my-editor";

export const RSelfEvaluation: React.FC = () => {

    const selfEvaluation = useAppSelector(getSelfEvaluation);
    const dispatch = useAppDispatch();

    return <ClsControl canDrag={true} controlBar={
        <ControlBar
            style={{top: 0}}
            displayConfig={{}}
        ></ControlBar>
    }>
        <SuTitle title='自我评价' icon={
            // <span className='iconfont icon-pingjia'></span>
            <MyIcon type={"pingjia"}/>
        }></SuTitle>
        <MyEditor
            defaultHtml={selfEvaluation}
            onContentChange={(html) => {
                dispatch(saveSelfEvaluation(html))
            }}
        ></MyEditor>
    </ClsControl>
}

